/*
 * @Version: 0.0.1
 * @Author: ider
 * @Date: 2021-09-01 15:05:51
 * @LastEditors: ider
 * @LastEditTime: 2021-09-02 15:40:54
 * @Description:
 */
package elastic

import (
	"github.com/elastic/go-elasticsearch/v8"
)

func InitElastic(esUrl string) *elasticsearch.Client {
	cfg := elasticsearch.Config{
		Addresses: []string{
			esUrl,
		},
	}
	es, _ := elasticsearch.NewClient(cfg)
	return es
}
